/*
 * Simple.h
 *
 *  Created on: Aug 22, 2011
 *      Author: erudhes
 */
#ifndef MAIN_PANEL_H_
#define MAIN_PANEL_H_
#include <vector>
#include <wx/wx.h>

class GameController;

class MainPanel : public wxPanel
{
	public:
		MainPanel(wxFrame* parent);
		virtual ~MainPanel();
		void onMouseDown(wxMouseEvent& mouseEvent);
		void onMouseUp(wxMouseEvent& mouseEvent);
		void onMouseMotion(wxMouseEvent& mouseEvent);
		void onPaint(wxPaintEvent& paintEvent);
		bool hostNew(const wxString& level);
		bool joinNew(const wxString& host);
		void finish();

	private:
		void handleNetworkError(const wxString& title, bool isServerSide);

		GameController* mGameController;

		DECLARE_EVENT_TABLE()
};

#endif /* MAIN_PANEL_H_ */
